package com.ftg.product.exam.mapper;

import com.diboot.core.mapper.BaseCrudMapper;
import com.ftg.product.exam.entity.SysOrganizations;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
* 组织机构表,
1.1 组织机构信息（学院名称、学院地址、学院说明、）
1.2 部门信息(名称、说明、地址)Mapper
* @author kangjx
* @version 1.0
* @date 2021-01-14
 * Copyright © ftg
*/
@Mapper
public interface SysOrganizationsMapper extends BaseCrudMapper<SysOrganizations> {

    @Select("select id from sys_employee where emporgcode = #{emporgcode}")
    List<Map<String,Object>> selectemp(Long emporgcode);

    @Delete("DELETE FROM sys_employee WHERE emporgcode = #{empoorgcode}")
    int deletebyemporgcode(Long emporgcode);

    @Delete("<script>delete from sys_employee where emporgcode in " +
            "<foreach collection='ids'  item='id' open='(' separator=',' close=')' > " +
            "#{id} " +
            "</foreach> " +
            "</script>")
    int deletes(List<Long> ids);
}

